package com.xuetang9.cloud.house.portal.web;

import com.xuetang9.cloud.house.domain.VO.AgentAndUserVO;
import com.xuetang9.cloud.house.domain.VO.NewsUserVO;
import com.xuetang9.cloud.house.domain.VO.PropertiesAndRentTypeVO;
import com.xuetang9.cloud.house.domain.entity.*;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * TODO
 *
 * @author 老九学堂
 * @copyright 老九学堂
 */
@Controller
public class IndexController {

    @RequestMapping({"/map.html"})
    public String index() {
        return "map";
    }

    @RequestMapping({"/", "/index.html"})
    public String defaultIndex(ModelMap modelMap) {
        modelMap.put("title", "房产交易平台");

        //新增加的房产
        List<PropertiesAndRentTypeVO> newAddOfProperty = new ArrayList<>();
        //房屋情况VO视图模型
        PropertiesAndRentTypeVO propertiesAndRentTypeVO = new PropertiesAndRentTypeVO();
        Properties property = new Properties();
        property.setTitle("江南宅院");
        property.setRentType(1);
        property.setGarageNumber(3);
        property.setBathroomNumber(4);
        property.setRoomNumber(6);
        property.setPrice(550f);
        property.setSquare(550f);
        property.setAddress("锦江区东大街下东大街568号");
        //添加当前房屋状态
        PropertiesRentType propertiesRentType = new PropertiesRentType();
        propertiesRentType.setTypeName("出租");
        //加入视图中
        propertiesAndRentTypeVO.setProperties(property);
        propertiesAndRentTypeVO.setPropertiesRentType(propertiesRentType);

        PropertiesAndRentTypeVO propertiesAndRentTypeVO1 = new PropertiesAndRentTypeVO();
        Properties property1 = new Properties();
        property1.setTitle("木马山别墅");
        property1.setRentType(1);
        property1.setGarageNumber(3);
        property1.setBathroomNumber(4);
        property1.setRoomNumber(6);
        property1.setPrice(550f);
        property1.setSquare(550f);
        property1.setAddress("城北大道450附22号");
        //添加当前房屋状态
        PropertiesRentType propertiesRentType1 = new PropertiesRentType();
        propertiesRentType1.setTypeName("出租");
        //加入视图中
        propertiesAndRentTypeVO1.setProperties(property1);
        propertiesAndRentTypeVO1.setPropertiesRentType(propertiesRentType1);

        PropertiesAndRentTypeVO propertiesAndRentTypeVO2 = new PropertiesAndRentTypeVO();
        Properties property2 = new Properties();
        property2.setTitle("皇家一号公寓");
        property2.setRentType(1);
        property2.setGarageNumber(3);
        property2.setBathroomNumber(4);
        property2.setRoomNumber(6);
        property2.setPrice(550f);
        property2.setSquare(550f);
        property2.setAddress("锦江区福字街215号");
        //添加当前房屋状态
        PropertiesRentType propertiesRentType2 = new PropertiesRentType();
        propertiesRentType2.setTypeName("出租");
        //加入视图中
        propertiesAndRentTypeVO2.setProperties(property2);
        propertiesAndRentTypeVO2.setPropertiesRentType(propertiesRentType2);

        PropertiesAndRentTypeVO propertiesAndRentTypeVO3 = new PropertiesAndRentTypeVO();
        Properties property3 = new Properties();
        property3.setTitle("龙城一号别墅");
        property3.setRentType(1);
        property3.setGarageNumber(3);
        property3.setBathroomNumber(4);
        property3.setRoomNumber(6);
        property3.setPrice(550f);
        property3.setSquare(550f);
        property3.setAddress("龙泉驿区南山大道333号附12号");
        //添加当前房屋状态
        PropertiesRentType propertiesRentType3 = new PropertiesRentType();
        propertiesRentType3.setTypeName("出租");
        //加入视图中
        propertiesAndRentTypeVO3.setProperties(property3);
        propertiesAndRentTypeVO3.setPropertiesRentType(propertiesRentType3);

        PropertiesAndRentTypeVO propertiesAndRentTypeVO4 = new PropertiesAndRentTypeVO();
        Properties property4 = new Properties();
        property4.setTitle("春天花园别墅");
        property4.setRentType(1);
        property4.setGarageNumber(3);
        property4.setBathroomNumber(4);
        property4.setRoomNumber(6);
        property4.setPrice(550f);
        property4.setSquare(550f);
        property4.setAddress("金牛区琴台西路668号");
        //添加当前房屋状态
        PropertiesRentType propertiesRentType4 = new PropertiesRentType();
        propertiesRentType4.setTypeName("出租");
        //加入视图中
        propertiesAndRentTypeVO4.setProperties(property4);
        propertiesAndRentTypeVO4.setPropertiesRentType(propertiesRentType4);

        PropertiesAndRentTypeVO propertiesAndRentTypeVO5 = new PropertiesAndRentTypeVO();
        Properties property5 = new Properties();
        property5.setTitle("万科西山别墅");
        property5.setRentType(1);
        property5.setGarageNumber(3);
        property5.setBathroomNumber(4);
        property5.setRoomNumber(6);
        property5.setPrice(550f);
        property5.setSquare(550f);
        property5.setAddress("万科西山别墅");
        //添加当前房屋状态
        PropertiesRentType propertiesRentType5 = new PropertiesRentType();
        propertiesRentType5.setTypeName("出租");
        //加入视图中
        propertiesAndRentTypeVO5.setProperties(property5);
        propertiesAndRentTypeVO5.setPropertiesRentType(propertiesRentType5);

        //添加新增加的房产
        newAddOfProperty.add(propertiesAndRentTypeVO);
        newAddOfProperty.add(propertiesAndRentTypeVO1);
        newAddOfProperty.add(propertiesAndRentTypeVO2);
        newAddOfProperty.add(propertiesAndRentTypeVO3);
        newAddOfProperty.add(propertiesAndRentTypeVO4);
        newAddOfProperty.add(propertiesAndRentTypeVO5);
        modelMap.put("newAddOfProperty", newAddOfProperty);

        //我们的服务
        List<PropertiesAndRentTypeVO> weService = new ArrayList<>();
        weService.add(propertiesAndRentTypeVO);
        weService.add(propertiesAndRentTypeVO1);
        modelMap.put("weService", weService);

        //特色房产
        List<PropertiesAndRentTypeVO> characteristicProperty = new ArrayList<>();
        characteristicProperty.add(propertiesAndRentTypeVO);
        characteristicProperty.add(propertiesAndRentTypeVO1);
        characteristicProperty.add(propertiesAndRentTypeVO2);
        characteristicProperty.add(propertiesAndRentTypeVO3);
        characteristicProperty.add(propertiesAndRentTypeVO4);
        characteristicProperty.add(propertiesAndRentTypeVO5);
        modelMap.put("characteristicProperty", characteristicProperty);

        //我的代理
        List<AgentAndUserVO> agents = new ArrayList<>();
        AgentAndUserVO agentAndUserVO = new AgentAndUserVO();
        User user = new User();
        user.setName("唐纳德.菲尔");
        user.setPhone("(756) 447 5779");
        Agent agent = new Agent();
        agent.setEmail("info@example.com");
        agentAndUserVO.setUser(user);
        agentAndUserVO.setAgent(agent);

        AgentAndUserVO agentAndUserVO2 = new AgentAndUserVO();
        User user2 = new User();
        user2.setName("朱.汉密尔顿");
        user2.setPhone("(756) 447 5779");
        Agent agent2 = new Agent();
        agent2.setEmail("info@example.com");
        agentAndUserVO2.setUser(user2);
        agentAndUserVO2.setAgent(agent2);

        AgentAndUserVO agentAndUserVO3 = new AgentAndUserVO();
        User user3 = new User();
        user3.setName("克莉期丁.吉尔波特");
        user3.setPhone("(756) 447 5779");
        Agent agent3 = new Agent();
        agent3.setEmail("info@example.com");
        agentAndUserVO3.setUser(user3);
        agentAndUserVO3.setAgent(agent3);

        AgentAndUserVO agentAndUserVO4 = new AgentAndUserVO();
        User user4 = new User();
        user4.setName("杰森.帕特");
        user4.setPhone("(756) 447 5779");
        Agent agent4 = new Agent();
        agent4.setEmail("info@example.com");
        agentAndUserVO4.setUser(user4);
        agentAndUserVO4.setAgent(agent4);

        AgentAndUserVO agentAndUserVO5 = new AgentAndUserVO();
        User user5 = new User();
        user5.setName("德布拉.伊尔斯");
        user5.setPhone("(756) 447 5779");
        Agent agent5 = new Agent();
        agent5.setEmail("info@example.com");
        agentAndUserVO5.setUser(user5);
        agentAndUserVO5.setAgent(agent5);

        //添加到我的代理列表
        agents.add(agentAndUserVO);
        agents.add(agentAndUserVO2);
        agents.add(agentAndUserVO3);
        agents.add(agentAndUserVO4);
        agents.add(agentAndUserVO5);
        modelMap.put("agents",agents);

        //最近的新闻
        List<NewsUserVO> recentNews = new ArrayList<>();

        NewsUserVO newsUserVO = new NewsUserVO();
        News news = new News();
        news.setTitle("豪华公寓楼");
        news.setContent("房产交易平台 这是elit的最佳主题，它将以一种独特的风格呈现。");
        news.setDate(new Date());
        newsUserVO.setNews(news);
        newsUserVO.setUser(user);

        NewsUserVO newsUserVO1 = new NewsUserVO();
        News news1 = new News();
        news1.setTitle("抵押房产");
        news1.setContent("房产交易平台 这是elit的最佳主题，它将以一种独特的风格呈现。");
        news1.setDate(new Date());
        newsUserVO1.setNews(news1);
        newsUserVO1.setUser(user);

        NewsUserVO newsUserVO2 = new NewsUserVO();
        News news2 = new News();
        news2.setTitle("学区房");
        news2.setContent("房产交易平台 这是elit的最佳主题，它将以一种独特的风格呈现。");
        news2.setDate(new Date());
        newsUserVO2.setNews(news2);
        newsUserVO2.setUser(user);

        NewsUserVO newsUserVO3 = new NewsUserVO();
        News news3 = new News();
        news3.setTitle("政府出租房");
        news3.setContent("房产交易平台 这是elit的最佳主题，它将以一种独特的风格呈现。");
        news3.setDate(new Date());
        newsUserVO3.setNews(news3);
        newsUserVO3.setUser(user);
        //添加到新闻列表
        recentNews.add(newsUserVO);
        recentNews.add(newsUserVO1);
        recentNews.add(newsUserVO2);
        recentNews.add(newsUserVO3);
        modelMap.put("recentNewsList",recentNews);

        return "index";
    }

    @RequestMapping("index-2.html")
    public String takeAdvertisingMapIndex(ModelMap modelMap) {
        modelMap.put("title", "房产交易平台");
        //轮播图集合
        List<PropertiesAndRentTypeVO> propertiesAndRentTypeVOS = new ArrayList<>();
        //VO视图模型
        PropertiesAndRentTypeVO propertiesAndRentTypeVO = new PropertiesAndRentTypeVO();
        Properties properties = new Properties();
        properties.setTitle("江南宅院");
        properties.setRentType(1);
        properties.setGarageNumber(3);
        properties.setBathroomNumber(4);
        properties.setRoomNumber(6);
        properties.setPrice(550f);
        properties.setSquare(550f);
        properties.setAddress("锦江区东大街下东大街568号");

        PropertiesRentType propertiesRentType = new PropertiesRentType();
        propertiesRentType.setTypeName("出租");

        //加入视图中
        propertiesAndRentTypeVO.setProperties(properties);
        propertiesAndRentTypeVO.setPropertiesRentType(propertiesRentType);

        //VO视图模型
        PropertiesAndRentTypeVO propertiesAndRentTypeVO2 = new PropertiesAndRentTypeVO();
        Properties properties2 = new Properties();
        properties2.setTitle("龙城一号别墅");
        properties2.setRentType(1);
        properties2.setGarageNumber(3);
        properties2.setBathroomNumber(4);
        properties2.setRoomNumber(6);
        properties2.setPrice(550f);
        properties2.setSquare(550f);
        properties2.setAddress("龙泉驿区南山大道333号附12号");
        PropertiesRentType propertiesRentType2 = new PropertiesRentType();
        propertiesRentType2.setTypeName("出租");
        //加入视图中
        propertiesAndRentTypeVO2.setProperties(properties2);
        propertiesAndRentTypeVO2.setPropertiesRentType(propertiesRentType2);

        propertiesAndRentTypeVOS.add(propertiesAndRentTypeVO);
        propertiesAndRentTypeVOS.add(propertiesAndRentTypeVO2);
        modelMap.put("sliderList", propertiesAndRentTypeVOS);

        List<PropertiesAndRentTypeVO> featureList = new ArrayList<>();
        PropertiesAndRentTypeVO propertiesAndRentTypeVO3 = new PropertiesAndRentTypeVO();
        Properties properties3 = new Properties();
        properties3.setTitle("木马山别墅");
        properties3.setRentType(1);
        properties3.setGarageNumber(3);
        properties3.setBathroomNumber(4);
        properties3.setRoomNumber(6);
        properties3.setPrice(2550f);
        properties3.setSquare(550f);
        properties3.setAddress("城北大道450附22号");
        PropertiesRentType propertiesRentType3 = new PropertiesRentType();
        propertiesRentType3.setTypeName("出售");
        propertiesAndRentTypeVO3.setProperties(properties3);
        propertiesAndRentTypeVO3.setPropertiesRentType(propertiesRentType3);
        featureList.add(propertiesAndRentTypeVO);
        featureList.add(propertiesAndRentTypeVO2);
        featureList.add(propertiesAndRentTypeVO3);
        featureList.add(propertiesAndRentTypeVO);
        featureList.add(propertiesAndRentTypeVO2);
        featureList.add(propertiesAndRentTypeVO3);
        modelMap.put("featureList", featureList);

        //服务集合
        List<PropertiesAndRentTypeVO> serviceList = new ArrayList<>();
        serviceList.add(propertiesAndRentTypeVO);
        serviceList.add(propertiesAndRentTypeVO2);
        modelMap.put("serviceList", serviceList);

        //新增加的房产
        List<PropertiesAndRentTypeVO> newAddList = new ArrayList<>();
        newAddList.add(propertiesAndRentTypeVO);
        newAddList.add(propertiesAndRentTypeVO2);
        newAddList.add(propertiesAndRentTypeVO3);
        newAddList.add(propertiesAndRentTypeVO);
        newAddList.add(propertiesAndRentTypeVO2);
        newAddList.add(propertiesAndRentTypeVO3);
        modelMap.put("newAddList", newAddList);

        List<AgentAndUserVO> agents = new ArrayList<>();
        AgentAndUserVO agentAndUserVO = new AgentAndUserVO();
        AgentAndUserVO agentAndUserVO2 = new AgentAndUserVO();
        AgentAndUserVO agentAndUserVO3 = new AgentAndUserVO();
        Agent agent = new Agent();
        agent.setEmail("info@example.com");
        User user = new User();
        user.setName("唐纳德.菲尔");
        user.setPhone("(756) 447 5779");
        Agent agent2 = new Agent();
        agent2.setEmail("info@example.com");
        User user2 = new User();
        user2.setName("朱.汉密尔顿");
        user2.setPhone("(756) 447 5779");
        Agent agent3 = new Agent();
        agent3.setEmail("info@example.com");
        User user3 = new User();
        user3.setName("克莉期丁.吉尔波特");
        user3.setPhone("(756) 447 5779");
        agentAndUserVO.setAgent(agent);
        agentAndUserVO.setUser(user);
        agentAndUserVO2.setAgent(agent2);
        agentAndUserVO2.setUser(user2);
        agentAndUserVO3.setAgent(agent3);
        agentAndUserVO3.setUser(user3);
        agents.add(agentAndUserVO);
        agents.add(agentAndUserVO2);
        agents.add(agentAndUserVO3);
        agents.add(agentAndUserVO);
        agents.add(agentAndUserVO2);
        agents.add(agentAndUserVO3);
        agents.add(agentAndUserVO);
        agents.add(agentAndUserVO2);
        agents.add(agentAndUserVO3);
        modelMap.put("agents", agents);

        //房产最近新闻
        List<NewsUserVO> newsUsers = new ArrayList<>();
        NewsUserVO newsUserVO = new NewsUserVO();
        News news = new News();
        news.setTitle("豪华公寓楼");
        news.setContent("房产交易平台 这是elit的最佳主题，它将以一种独特的风格呈现。");
        news.setDate(new Date());
        newsUserVO.setNews(news);
        newsUserVO.setUser(user);
        NewsUserVO newsUserVO2 = new NewsUserVO();
        News news2 = new News();
        news2.setTitle("学区房");
        news2.setContent("房产交易平台 这是elit的最佳主题，它将以一种独特的风格呈现。");
        news2.setDate(new Date());
        newsUserVO2.setNews(news2);
        newsUserVO2.setUser(user2);
        NewsUserVO newsUserVO3 = new NewsUserVO();
        News news3 = new News();
        news3.setTitle("抵押房产");
        news3.setContent("房产交易平台 这是elit的最佳主题，它将以一种独特的风格呈现。");
        news3.setDate(new Date());
        newsUserVO3.setNews(news3);
        newsUserVO3.setUser(user3);
        newsUsers.add(newsUserVO);
        newsUsers.add(newsUserVO2);
        newsUsers.add(newsUserVO3);
        newsUsers.add(newsUserVO);
        newsUsers.add(newsUserVO2);
        newsUsers.add(newsUserVO3);
        modelMap.put("newsUsers", newsUsers);
        return "index-2";
    }

    @RequestMapping("index-3.html")
    public String takeMapIndex(ModelMap modelMap) {
        //新增加的房产
        List<PropertiesAndRentTypeVO> newAddOfProperty = new ArrayList<>();


        //房屋情况VO视图模型
        PropertiesAndRentTypeVO propertiesAndRentTypeVO = new PropertiesAndRentTypeVO();
        Properties property = new Properties();
        property.setTitle("江南宅院");
        property.setRentType(1);
        property.setGarageNumber(3);
        property.setBathroomNumber(4);
        property.setRoomNumber(6);
        property.setPrice(550f);
        property.setSquare(550f);
        property.setAddress("锦江区东大街下东大街568号");
        //添加当前房屋状态
        PropertiesRentType propertiesRentType = new PropertiesRentType();
        propertiesRentType.setTypeName("出租");
        //加入视图中
        propertiesAndRentTypeVO.setProperties(property);
        propertiesAndRentTypeVO.setPropertiesRentType(propertiesRentType);

        PropertiesAndRentTypeVO propertiesAndRentTypeVO1 = new PropertiesAndRentTypeVO();
        Properties property1 = new Properties();
        property1.setTitle("木马山别墅");
        property1.setRentType(1);
        property1.setGarageNumber(3);
        property1.setBathroomNumber(4);
        property1.setRoomNumber(6);
        property1.setPrice(550f);
        property1.setSquare(550f);
        property1.setAddress("城北大道450附22号");
        //添加当前房屋状态
        PropertiesRentType propertiesRentType1 = new PropertiesRentType();
        propertiesRentType1.setTypeName("出租");
        //加入视图中
        propertiesAndRentTypeVO1.setProperties(property1);
        propertiesAndRentTypeVO1.setPropertiesRentType(propertiesRentType1);

        PropertiesAndRentTypeVO propertiesAndRentTypeVO2 = new PropertiesAndRentTypeVO();
        Properties property2 = new Properties();
        property2.setTitle("皇家一号公寓");
        property2.setRentType(1);
        property2.setGarageNumber(3);
        property2.setBathroomNumber(4);
        property2.setRoomNumber(6);
        property2.setPrice(550f);
        property2.setSquare(550f);
        property2.setAddress("锦江区福字街215号");
        //添加当前房屋状态
        PropertiesRentType propertiesRentType2 = new PropertiesRentType();
        propertiesRentType2.setTypeName("出租");
        //加入视图中
        propertiesAndRentTypeVO2.setProperties(property2);
        propertiesAndRentTypeVO2.setPropertiesRentType(propertiesRentType2);

        PropertiesAndRentTypeVO propertiesAndRentTypeVO3 = new PropertiesAndRentTypeVO();
        Properties property3 = new Properties();
        property3.setTitle("龙城一号别墅");
        property3.setRentType(1);
        property3.setGarageNumber(3);
        property3.setBathroomNumber(4);
        property3.setRoomNumber(6);
        property3.setPrice(550f);
        property3.setSquare(550f);
        property3.setAddress("龙泉驿区南山大道333号附12号");
        //添加当前房屋状态
        PropertiesRentType propertiesRentType3 = new PropertiesRentType();
        propertiesRentType3.setTypeName("出租");
        //加入视图中
        propertiesAndRentTypeVO3.setProperties(property3);
        propertiesAndRentTypeVO3.setPropertiesRentType(propertiesRentType3);

        PropertiesAndRentTypeVO propertiesAndRentTypeVO4 = new PropertiesAndRentTypeVO();
        Properties property4 = new Properties();
        property4.setTitle("春天花园别墅");
        property4.setRentType(1);
        property4.setGarageNumber(3);
        property4.setBathroomNumber(4);
        property4.setRoomNumber(6);
        property4.setPrice(550f);
        property4.setSquare(550f);
        property4.setAddress("金牛区琴台西路668号");
        //添加当前房屋状态
        PropertiesRentType propertiesRentType4 = new PropertiesRentType();
        propertiesRentType4.setTypeName("出租");
        //加入视图中
        propertiesAndRentTypeVO4.setProperties(property4);
        propertiesAndRentTypeVO4.setPropertiesRentType(propertiesRentType4);

        PropertiesAndRentTypeVO propertiesAndRentTypeVO5 = new PropertiesAndRentTypeVO();
        Properties property5 = new Properties();
        property5.setTitle("万科西山别墅");
        property5.setRentType(1);
        property5.setGarageNumber(3);
        property5.setBathroomNumber(4);
        property5.setRoomNumber(6);
        property5.setPrice(550f);
        property5.setSquare(550f);
        property5.setAddress("万科西山别墅");
        //添加当前房屋状态
        PropertiesRentType propertiesRentType5 = new PropertiesRentType();
        propertiesRentType5.setTypeName("出租");
        //加入视图中
        propertiesAndRentTypeVO5.setProperties(property5);
        propertiesAndRentTypeVO5.setPropertiesRentType(propertiesRentType5);

        //添加新增加的房产
        newAddOfProperty.add(propertiesAndRentTypeVO);
        newAddOfProperty.add(propertiesAndRentTypeVO1);
        newAddOfProperty.add(propertiesAndRentTypeVO2);
        newAddOfProperty.add(propertiesAndRentTypeVO3);
        newAddOfProperty.add(propertiesAndRentTypeVO4);
        newAddOfProperty.add(propertiesAndRentTypeVO5);
        modelMap.put("newAddOfProperty", newAddOfProperty);


        //我们的服务
        List<PropertiesAndRentTypeVO> weService = new ArrayList<>();
        weService.add(propertiesAndRentTypeVO);
        weService.add(propertiesAndRentTypeVO1);
        modelMap.put("weService", weService);

        //特色房产
        List<PropertiesAndRentTypeVO> characteristicProperty = new ArrayList<>();
        characteristicProperty.add(propertiesAndRentTypeVO);
        characteristicProperty.add(propertiesAndRentTypeVO1);
        characteristicProperty.add(propertiesAndRentTypeVO2);
        characteristicProperty.add(propertiesAndRentTypeVO3);
        characteristicProperty.add(propertiesAndRentTypeVO4);
        characteristicProperty.add(propertiesAndRentTypeVO5);
        modelMap.put("characteristicProperty", characteristicProperty);

        //我的代理
        List<AgentAndUserVO> agents = new ArrayList<>();
        AgentAndUserVO agentAndUserVO = new AgentAndUserVO();
        User user = new User();
        user.setName("唐纳德.菲尔");
        user.setPhone("(756) 447 5779");
        Agent agent = new Agent();
        agent.setEmail("info@example.com");
        agentAndUserVO.setUser(user);
        agentAndUserVO.setAgent(agent);

        AgentAndUserVO agentAndUserVO2 = new AgentAndUserVO();
        User user2 = new User();
        user2.setName("朱.汉密尔顿");
        user2.setPhone("(756) 447 5779");
        Agent agent2 = new Agent();
        agent2.setEmail("info@example.com");
        agentAndUserVO2.setUser(user2);
        agentAndUserVO2.setAgent(agent2);

        AgentAndUserVO agentAndUserVO3 = new AgentAndUserVO();
        User user3 = new User();
        user3.setName("克莉期丁.吉尔波特");
        user3.setPhone("(756) 447 5779");
        Agent agent3 = new Agent();
        agent3.setEmail("info@example.com");
        agentAndUserVO3.setUser(user3);
        agentAndUserVO3.setAgent(agent3);

        AgentAndUserVO agentAndUserVO4 = new AgentAndUserVO();
        User user4 = new User();
        user4.setName("杰森.帕特");
        user4.setPhone("(756) 447 5779");
        Agent agent4 = new Agent();
        agent4.setEmail("info@example.com");
        agentAndUserVO4.setUser(user4);
        agentAndUserVO4.setAgent(agent4);

        AgentAndUserVO agentAndUserVO5 = new AgentAndUserVO();
        User user5 = new User();
        user5.setName("德布拉.伊尔斯");
        user5.setPhone("(756) 447 5779");
        Agent agent5 = new Agent();
        agent5.setEmail("info@example.com");
        agentAndUserVO5.setUser(user5);
        agentAndUserVO5.setAgent(agent5);

        //添加到我的代理列表
        agents.add(agentAndUserVO);
        agents.add(agentAndUserVO2);
        agents.add(agentAndUserVO3);
        agents.add(agentAndUserVO4);
        agents.add(agentAndUserVO5);
        modelMap.put("agents",agents);

        //最近的新闻
        List<NewsUserVO> recentNews = new ArrayList<>();

        NewsUserVO newsUserVO = new NewsUserVO();
        News news = new News();
        news.setTitle("豪华公寓楼");
        news.setContent("房产交易平台 这是elit的最佳主题，它将以一种独特的风格呈现。");
        news.setDate(new Date());
        newsUserVO.setNews(news);
        newsUserVO.setUser(user);

        NewsUserVO newsUserVO1 = new NewsUserVO();
        News news1 = new News();
        news1.setTitle("抵押房产");
        news1.setContent("房产交易平台 这是elit的最佳主题，它将以一种独特的风格呈现。");
        news1.setDate(new Date());
        newsUserVO1.setNews(news1);
        newsUserVO1.setUser(user);

        NewsUserVO newsUserVO2 = new NewsUserVO();
        News news2 = new News();
        news2.setTitle("学区房");
        news2.setContent("房产交易平台 这是elit的最佳主题，它将以一种独特的风格呈现。");
        news2.setDate(new Date());
        newsUserVO2.setNews(news2);
        newsUserVO2.setUser(user);

        NewsUserVO newsUserVO3 = new NewsUserVO();
        News news3 = new News();
        news3.setTitle("政府出租房");
        news3.setContent("房产交易平台 这是elit的最佳主题，它将以一种独特的风格呈现。");
        news3.setDate(new Date());
        newsUserVO3.setNews(news3);
        newsUserVO3.setUser(user);
        //添加到新闻列表
        recentNews.add(newsUserVO);
        recentNews.add(newsUserVO1);
        recentNews.add(newsUserVO2);
        recentNews.add(newsUserVO3);
        modelMap.put("recentNewsList",recentNews);

        return "index-3";
    }


}
